<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of payment
 *
 * @author win7
 */
class pages extends cms_controller {

    //put your code here
    public function __construct() {
        parent::__construct();
        $this->load->model('pages_model');
    }

    public function view($slug = false) {
        if ($slug) {
            $sql = $this->pages_model->is_found(array('slug' => $slug));
            $data['result'] = $sql;
            $this->themes->render('pages/view', $data);
        } else {
            show_404();
        }
    }

    public function payment() {
        $this->load->model('banks_model', 'banks');
        $this->pass['banks'] = $this->banks->get();
        $this->themes->render('pages/payment', $this->pass);
    }

    public function aboutus() {
        $this->themes->render('pages/about');
    }

    public function faq() {
        $sql = $this->db->get_where('faq', array('active' => 'YES'));
        $data['result'] = $sql->result();
        $this->themes->render('pages/faq', $data);
    }

    public function serves() {
        $this->themes->render('pages/serves');
    }

    public function site() {
        $this->themes->render('pages/site');
    }

    public function close() {
        $this->themes->render('pages/close', array(), FALSE, 'pages/close');
    }

    public function error_404() {
        $this->themes->render('pages/close', array(), FALSE, 'pages/error_404');
    }

}

?>
